3.1622 \(\int \frac{1}{\left (a+\frac{b}{x}\right )^2} \, dx\)

Optimal. Leaf size=34 \[ -\frac{2 b \log (a x+b)}{a^3}+\frac{2 x}{a^2}-\frac{x}{a \left (a+\frac{b}{x}\right )} \]

[Out]

(2*x)/a^2 - x/(a*(a + b/x)) - (2*b*Log[b + a*x])/a^3

_______________________________________________________________________________________

Rubi [A]  time = 0.0418199, antiderivative size = 34, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333 \[ -\frac{2 b \log (a x+b)}{a^3}+\frac{2 x}{a^2}-\frac{x}{a \left (a+\frac{b}{x}\right )} \]

Antiderivative was successfully verified.

[In]  Int[(a + b/x)^(-2),x]

[Out]

(2*x)/a^2 - x/(a*(a + b/x)) - (2*b*Log[b + a*x])/a^3

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ - \frac{x}{a \left (a + \frac{b}{x}\right )} + \frac{2 \int \frac{1}{a}\, dx}{a} - \frac{2 b \log{\left (a x + b \right )}}{a^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(1/(a+b/x)**2,x)

[Out]

-x/(a*(a + b/x)) + 2*Integral(1/a, x)/a - 2*b*log(a*x + b)/a**3

_______________________________________________________________________________________

Mathematica [A]  time = 0.0209966, size = 29, normalized size = 0.85 \[ \frac{-\frac{b^2}{a x+b}-2 b \log (a x+b)+a x}{a^3} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b/x)^(-2),x]

[Out]

(a*x - b^2/(b + a*x) - 2*b*Log[b + a*x])/a^3

_______________________________________________________________________________________

Maple [A]  time = 0.009, size = 34, normalized size = 1. \[{\frac{x}{{a}^{2}}}-{\frac{{b}^{2}}{ \left ( ax+b \right ){a}^{3}}}-2\,{\frac{b\ln \left ( ax+b \right ) }{{a}^{3}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(1/(a+b/x)^2,x)

[Out]

x/a^2-b^2/(a*x+b)/a^3-2*b*ln(a*x+b)/a^3

_______________________________________________________________________________________

Maxima [A]  time = 1.44191, size = 49, normalized size = 1.44 \[ -\frac{b^{2}}{a^{4} x + a^{3} b} + \frac{x}{a^{2}} - \frac{2 \, b \log \left (a x + b\right )}{a^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^(-2),x, algorithm="maxima")

[Out]

-b^2/(a^4*x + a^3*b) + x/a^2 - 2*b*log(a*x + b)/a^3

_______________________________________________________________________________________

Fricas [A]  time = 0.219918, size = 63, normalized size = 1.85 \[ \frac{a^{2} x^{2} + a b x - b^{2} - 2 \,{\left (a b x + b^{2}\right )} \log \left (a x + b\right )}{a^{4} x + a^{3} b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^(-2),x, algorithm="fricas")

[Out]

(a^2*x^2 + a*b*x - b^2 - 2*(a*b*x + b^2)*log(a*x + b))/(a^4*x + a^3*b)

_______________________________________________________________________________________

Sympy [A]  time = 1.27855, size = 31, normalized size = 0.91 \[ - \frac{b^{2}}{a^{4} x + a^{3} b} + \frac{x}{a^{2}} - \frac{2 b \log{\left (a x + b \right )}}{a^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a+b/x)**2,x)

[Out]

-b**2/(a**4*x + a**3*b) + x/a**2 - 2*b*log(a*x + b)/a**3

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.232704, size = 46, normalized size = 1.35 \[ \frac{x}{a^{2}} - \frac{2 \, b{\rm ln}\left ({\left | a x + b \right |}\right )}{a^{3}} - \frac{b^{2}}{{\left (a x + b\right )} a^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^(-2),x, algorithm="giac")

[Out]

x/a^2 - 2*b*ln(abs(a*x + b))/a^3 - b^2/((a*x + b)*a^3)